<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <input id="inputEL" type="text" name="username" age="20">
  <script>
    const inputEL = document.getElementById('inputEL');
    console.log(inputEL.name);//username
    inputEL.setAttribute('name', 'uname');
    setTimeout(() => {
      console.log(inputEL.name);//uname
    }, 3000)

  </script>
</body>

</html>